package com.chrray.position.entity.position.base;

import com.chrray.position.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.util.Date;


/**
 *系统用户表
 *@author lm
**/
@Entity
@Data
@ApiModel(value ="系统用户表")
public class SysUserBaseEntity extends  BaseEntity{
	/**
	 *
	 */
	@Id
	@NotNull(message ="是必填项")
	@ApiModelProperty(value = "",required = true)
	private Long id;


    @ApiModelProperty(value = " 成员姓名")
    private String userName;

    @ApiModelProperty(value = "成员账户")
    private String account;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "是否超级管理员")
    private Integer isManage;

    @ApiModelProperty(value = "角色id")
    private Long roleId;

    @ApiModelProperty(value = "状态")
    private Integer state;

    @ApiModelProperty(value = "删除状态")
    private Integer deleted;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "0默认角色权限1自定义权限")
    private Integer roleStatus;



    @ApiModelProperty(value = "邮箱地址")
    private String email;

    @ApiModelProperty(value = "备注信息")
    private String remark;



    @ApiModelProperty(value = "角色名称")
    @Transient
    String  roleName;
    @ApiModelProperty(value = "头像")
    String  headPic;



}
